package com.example.mybubbleshooter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.MotionEvent;

public class resultActivity extends Activity {
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Intent intent = getIntent();
		String stat = intent.getStringExtra("status");
		if(stat.equals("win"))
			getWindow().setBackgroundDrawableResource(R.drawable.win);
		else
			getWindow().setBackgroundDrawableResource(R.drawable.lost);
	}

	@Override
	public void onBackPressed() {
		// your code.
		finish();
		startActivity(new Intent(this, MainActivity.class));
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		finish();
		startActivity(new Intent(this, MainActivity.class));
		return super.onTouchEvent(event);
	}
}
